package com.zdtech.action;

import java.util.List;

import javax.annotation.Resource;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;
import com.zdtech.common.DataResults;
import com.zdtech.entity.TMenu;
import com.zdtech.service.BaseSerive;

public class ShowMenuAction extends ActionSupport{
	
	private DataResults<TMenu> dataResults = new DataResults<>();
	@Resource
	private BaseSerive baseService;
	
	public String execute() throws Exception {
		List<TMenu> menulist = baseService.showMenuAll();
		dataResults.setSuccess(true);
		dataResults.setResults(menulist);
		dataResults.setTotal(menulist.size());
		return Action.SUCCESS;
	}
	public DataResults<TMenu> getDataResults() {
		return dataResults;
	}
	public void setDataResults(DataResults<TMenu> dataResults) {
		this.dataResults = dataResults;
	}
	
}
